package com.home.customtest.data

import com.custom.action.core.annotations.*
import com.custom.jdbc.handler.BooleanTypeHandler
import com.home.customtest.entity.Province
import com.home.customtest.entity.Street
import java.math.BigDecimal
import java.util.*

/**
 * @author XiaoBai
 * @since 2024/3/10 0010 0:13
 *
 */
@DbTable("student")
class StudentInfo {

    var sex: Boolean? = null

    var phone: String? = null

    @DbKey
    var id: Int? = null

    var name: String? = null

    @DbNotField
    var province: Province? = null

    @DbField("nick_code")
    var nickName: String? = null

    var password: String? = null

//    @DbRelated(joinTable = "employee", joinAlias = "emp", condition = "emp.id = a.id", field = "emp_name")
//    private String proName;


    //    @DbRelated(joinTable = "employee", joinAlias = "emp", condition = "emp.id = a.id", field = "emp_name")
    //    private String proName;
    var age: Int? = null


    var money: BigDecimal? = null


    var address: String? = null

    @DbField("birthday")
    var birth: Date? = null

    var state: Int? = null

    @DbLogic(value = "false", delValue = "true", typeHandler = BooleanTypeHandler::class)
    var stateFlag: Boolean? = null


    var proId: Int? = null


    var cityId: Int? = null


    var areaId: Int? = null

    @DbField(exist = false)
    var city: String? = null

    @DbField(exist = false)
    var area: String? = null

    @DbNotField
    var modelList: List<Street>? = null

}